<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jsp/jstl/core">

<ui:composition template="/WEB-INF/templates/BasicTemplate.xhtml">
	
	<ui:define name="content">
	<c:set target="#{userBean}" property="action" value="ADD_PRICES"/>
	    <div id="addPrices">
	    	

   		 <h:form id="gameForm" rendered="#{userBean.permissions}">
		    <h:panelGrid columns="2" >
		    		
		    		<h:outputLabel value="Team A:" />
		    		<h:outputLabel value="#{gameBean.teamA}"/>
		    		
		    		<h:outputLabel value="Team B:"/>
		    		<h:outputLabel value="#{gameBean.teamB}"/>
		    		
		    		<h:outputLabel value="Date:"/>
		    		<h:outputLabel value="#{gameBean.day} -  #{gameBean.month} - #{gameBean.year}"   />
		    		
		    		<h:outputLabel value="Time:"/>
		    		<h:outputLabel value="#{gameBean.hour} :  #{gameBean.minute}"/>
		    		
		    		<h:outputLabel value="Stadium:"/>
		    		<h:outputLabel value="#{gameBean.stadium} in  #{gameBean.city}"/>
		    		
			    		<h:commandButton id = "save" action="#{gameBean.save}" value="Save"/>
			    		<h:message for= "save" style="background-color:red;"/>
		    				    	

		    		
		    		
	    	
	    	
	    	
	    	<h:outputScript library="js" name="jquery-1.7.1.min.js" />
	   		<h:outputScript library="js" name="stadium.js" />
		    
		    <canvas width="400px" height="300px" id="canvas"  style = " margin: 0 auto; border: 1px solid black;" >
       			Canvas not supported.          
       		</canvas>
       		
       		<script type="text/javascript">
       			setScale(0.5);
       			init2("#{gameBean.capacity}", "#{gameBean.tribunes[0]}", "#{gameBean.tribunes[1]}",
       					"#{gameBean.tribunes[2]}", "#{gameBean.tribunes[3]}" );
       			
       		</script>
		    </h:panelGrid>
	    	</h:form>
		    <h:outputLabel value="You don't have permissions to this page" rendered="#{!userBean.permissions}"/>
	    </div>
	</ui:define>
</ui:composition>
</html>